package com.itheima.bytes;

import java.io.UnsupportedEncodingException;

public class Demo02 {

    public static void main(String[] args) throws UnsupportedEncodingException {

        String s = "李楠";

        /*byte[] bytes = s.getBytes();
        String s1 = new String(bytes);
        System.out.println(s1);*/

        System.out.println("-----------------------");

        byte[] gbks = s.getBytes("GBK");
        String s1 = new String(gbks,"GBK");
        System.out.println(s1);

    }
}
